<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html>
<head>
  <title>validate (Blueprint::Validator)</title>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
  <pre><span class="ruby-comment cmt"># File lib/blueprint/validator.rb, line 11</span>
    <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">validate</span>
      <span class="ruby-identifier">java_path</span> = <span class="ruby-value">`which java`</span>.<span class="ruby-identifier">rstrip</span>
      <span class="ruby-identifier">raise</span> <span class="ruby-value str">&quot;You do not have a Java installed, but it is required.&quot;</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">java_path</span>.<span class="ruby-identifier">blank?</span>
    
      <span class="ruby-identifier">output_header</span>
    
      <span class="ruby-constant">Blueprint</span><span class="ruby-operator">::</span><span class="ruby-constant">CSS_FILES</span>.<span class="ruby-identifier">keys</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">file_name</span><span class="ruby-operator">|</span>
        <span class="ruby-identifier">css_output_path</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-constant">Blueprint</span><span class="ruby-operator">::</span><span class="ruby-constant">BLUEPRINT_ROOT_PATH</span>, <span class="ruby-identifier">file_name</span>)
        <span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;\n\n  Testing #{css_output_path}&quot;</span>
        <span class="ruby-identifier">puts</span> <span class="ruby-value str">&quot;  Output ============================================================\n\n&quot;</span>
        <span class="ruby-ivar">@error_count</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span> <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">system</span>(<span class="ruby-node">&quot;#{java_path} -jar '#{Blueprint::VALIDATOR_FILE}' -e '#{css_output_path}'&quot;</span>)
      <span class="ruby-keyword kw">end</span>
    
      <span class="ruby-identifier">output_footer</span>
    <span class="ruby-keyword kw">end</span></pre>
</body>
</html>